package com.hy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hy.medicine.evaluation.pojo.MedicineEvaluationImage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 评价图片
 */
@Mapper
public interface MedicineEvaluationImageMapper extends BaseMapper<MedicineEvaluationImage> {

    /**
     * 根据评价id查询评价图片
     * @param evaluationId
     * @return
     */
    @Select("SELECT * FROM medicine_evaluation_image WHERE evaluation_id = #{evaluationId} ORDER BY sort_order")
    List<MedicineEvaluationImage> selectByEvaluationId(@Param("evaluationId") Integer evaluationId);
}
